package com.oocl.handlebatchdata.formatptint;

import java.util.Set;

import com.oocl.handlebatchdata.customer.Customer;

public class FormatPrinter {

	public static void printCustomer(Set<Customer> cs){
		for(Customer c:cs){
			System.out.println(" id:"+c.getId()+", name:"+c.getName()+", email:"+c.getEmail()+", sex:"+c.getSex()+", birthday:"+c.getBirthday());
		}
	}
	
	public static void printCustomerXml(Set<Customer> cs){
		System.out.println("<Customers>");
		for(Customer c:cs){
			System.out.println("\t<Customer id=\""+c.getId()+"\">");
			System.out.println("\t\t<name>"+c.getName()+"</name>");
			System.out.println("\t\t<email>"+c.getEmail()+"</email>");
			System.out.println("\t\t<sex>"+c.getSex()+"</sex>");
			System.out.println("\t\t<birthday>"+c.getBirthday()+"</birthday>");
			System.out.println("\t</Customer>");
		}
		System.out.println("</Customers>");
	}
	
}
